package com.ac.app.web.view;

import com.caac.core.config.Config;
import com.caac.core.web.view.BaseView;
import com.ac.app.dm.PickKeyword;
import com.ac.app.dm.PickSubject;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright AgileCentury 2008</p>
 * <p>Company: AgileCentury </p>
 * @author <a href="mailto:ac@agilecentury.com">Agile</a>
 * @version 1.0
 */

public class PkKeywordView extends BaseView {
    private PickKeyword pickKeyword;

    public PickKeyword getPickKeyword() {
        return pickKeyword;
    }

    public void setPickKeyword(PickKeyword pickKeyword) {
        this.pickKeyword = pickKeyword;
    }

    public String getId() {
        return pickKeyword.getId();
    }

    public String getSubCode() {
        PickSubject dm = (PickSubject) Config.getInstance().getSubjects()
                .getChild(pickKeyword.getSubCode());
        if (dm != null) {
            return dm.getSubName();
        } else {
            return pickKeyword.getSubCode();
        }
    }
}
